<form action="{:sysuri()}" method="post" data-auto="true" class="layui-form layui-card" style="height: 600px;" data-table-id="Table" >
  <div class="layui-card-body padding-left-40">
      <fieldset class="layui-bg-gray">
          <legend><b class="layui-badge think-bg-violet">辅种任务定时计划</b></legend>

          <div class="layui-row layui-col-space15">
              <div class="layui-col-xs6">
                  <label class="block relative">
                      <span class="help-label"><b>任务名称</b></span>
                      <input name="title" required vali-name="任务名称"  class="layui-input">
                      <span class="help-block">自定义</span>
                  </label>
              </div>
              <div class="layui-col-xs6">
                  <label class="block relative">
                      <span class="help-label"><b>执行间隔时间（单位：秒）</b</span>
                        <input name="cronTime" required vali-name="执行间隔时间"  class="layui-input">
                      <span class="help-block">相隔多久执行一次任务，填写秒数</span>
                  </label>
              </div>
              <div class="layui-col-xs6">
                <div class="block relative">
                    <span class="help-label"><b>下载器</b></span>
                    <div id="demo1" class="xm-select-demo"></div>
                    <span class="help-block">选择辅种下载器</span>
                </div>
              </div>
              <div class="layui-col-xs6">
                <label class="block relative">
                    <span class="help-label"><b>启用</b></span>
                    <select name="status"  required vali-name="启用"  class="layui-input">
                      <option value="">请选择</option>
                      <option value="0">否</option>  
                      <option value="1">是</option> 
                    </select>
                    <span class="help-block">决定任务是否启用</span>
                </label>
              </div>
              <div class="layui-col-xs12">
                <label class="block relative">
                    <span class="help-label"><b>辅种方式</b></span>
                    <select name="command"  required vali-name="辅种方式"  class="layui-input">
                      <option value="">请选择</option>
                      <option value="cron">内置</option>  
                      <option value="search">Jackett</option> 
                    </select>
                    <br class="help-block">【内置，Jackett】</br>内置的就是辅种时只选择配置了的站点进行辅种</br>Jackett就是根据用户在Jackett平台中配置的站点进行辅种,使用Jackett方式前请先点击《头像-key配置》进行参数配置</span>
                </label>
              </div>
          </div>
      </fieldset>
  </div>

  <div class="hr-line-dashed"></div>
  {notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}

  <div class="layui-form-item text-center" style="padding-bottom: 20px;">
      <button class="layui-btn" type='submit'>保存数据</button>
      <button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗？" data-close>取消编辑</button>
  </div>
</form>
<script>
    $.ajax({
      url: 'admin/api.download',
      success: function(result){
        demo1 = xmSelect.render({
          el: '#demo1',
          name:'downloadId',
          data: result.data,
          // radio: true,
          clickClose: true,
          toolbar: { show: true },
          model: {
            label: {
              type: 'block',
              block: {
                //最大显示数量, 0:不限制
                showCount: 3,
                //是否显示删除图标
                showIcon: true,
              }
            }
          },
        });
      }
    });
</script>